home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games 1996 July / Amiga Games 1996 #7.iso / rexx / bounce.erex < prev    next >
Text File  |  1996-03-31  |  534b  |  49 lines

  1. /* EasyCalc 2.0 Arexx Script */
  2.  
  3. options results
  4.  
  5. 'getresponse "This script makes the cursor bounce around the screen" "_Begin"'
  6.  
  7. quit = 0
  8. dx=1
  9. dy=1
  10.  
  11. getmincol
  12. minx = result
  13.  
  14. getminrow
  15. miny = result
  16.  
  17. getmaxrow
  18. maxy = result
  19.  
  20. getmaxcol
  21. maxx = result
  22.  
  23. cx = minx
  24.  
  25. cy = miny
  26.  
  27. easytofront
  28.  
  29. do while quit < 100
  30.  
  31.   movecursor cx cy
  32.   cx = cx + dx
  33.   cy = cy + dy
  34.   
  35.   if (cx = maxx - 1) then
  36.     dx = -dx
  37.  
  38.   if (cx = minx ) then
  39.     dx = -dx
  40.  
  41.   if (cy = maxy - 1) then
  42.     dy = -dy
  43.  
  44.   if (cy = miny ) then
  45.     dy = -dy
  46.  
  47.   quit = quit + 1
  48. end
  49.